Skip to content

VAPI-3437 Add <Refer> BXML verb - #201

Merged
ckoegel merged 7 commits into
mainfrom
VAPI-3437
Aug 17, 2026
Merged

VAPI-3437 Add <Refer> BXML verb#201
ckoegel merged 7 commits into
mainfrom
VAPI-3437

Conversation

@stampercasey

@stampercasey stampercasey commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds the <Refer> BXML verb, which sends a call off to a SIP endpoint via SIP REFER.
  • Reuses the existing Transfer-flavored SipUri type for <Refer>'s SIP URI child element, rather than introducing a separate ReferSipUri type — see VAPI-3437 for the design rationale.
  • Refer.SipUriElement's setter validates that only Uri is set (and that it starts with sip:); attaching a SipUri with any Transfer-only attribute (Username, TransferAnswerUrl, Uui, etc.) throws ArgumentException naming the offending attribute(s).
  • This PR intentionally does not include the ReferCompleteCallback model — that will land separately once the api-specs schema (VAPI-3440) is merged, so the SDK-generation workflow can produce it consistently across SDKs.

Supersedes #190, which bundled the verb with the callback model and used a nested Refer.SipUri class that unintentionally shadowed the shared SipUri type.

Test plan

  • dotnet test passes for TestRefer.cs, including new cases covering each Transfer-only attribute being rejected (both via WithSipUri() and direct SipUriElement assignment) and a regression check that Transfer's own use of SipUri is unaffected
  • Docs (docs/Refer.md) reviewed for the Transfer-vs-Refer attribute table

The <Refer> verb hands a call off to a SIP endpoint via SIP REFER.
Reuses the existing Transfer-flavored SipUri type instead of a
distinct Refer-only type, with validation rejecting Transfer-only
attributes (TransferAnswerUrl, Username, Uui, etc.) when a SipUri is
attached to Refer.
@stampercasey
stampercasey requested review from a team as code owners July 7, 2026 13:30
@bwappsec

bwappsec commented Jul 7, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@stampercasey stampercasey changed the title VAPI-3437 Add <Refer> BXML verb (reuses shared SipUri) feat(bxml): add Refer verb for SIP call transfer Jul 7, 2026
@stampercasey stampercasey changed the title feat(bxml): add Refer verb for SIP call transfer VAPI-3437 Add <Refer> BXML verb Jul 7, 2026
Comment thread docs/Refer.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be trying to replicate the autogenerated model docs for the opeanpi schemas. Since it wont come from the api spec, it will need to be hand maintained going forward, and it is also the only BXML verb to have one of these docs. I'd recommend deleting this, customers can use the guide on the dev docs and see the code snippets we'll add there instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model got a bit over-engineered. I'm gonna make some changes on the branch to make it more closely align to our other verbs, but for reference:

  • we typically leave validation out of BXML models for simplicity, and if validation is needed it can be done on the PV side
  • no other verbs only have the WithFieldName methods, these are unnecessary for constructing the verb and add bloat to the model

@stampercasey
stampercasey requested a review from ckoegel July 16, 2026 18:40
stampercasey added a commit to Bandwidth/java-sdk that referenced this pull request Jul 30, 2026
ReferCompleteCallback (and its ReferCallStatusEnum dependency) will land
later via a separate api-specs-driven PR once VAPI-3440 merges, so it
doesn't belong in this PR yet.

Refer's nested Refer.ReferSipUri is also removed in favor of the existing
Transfer-flavored SipUri class, matching the merged csharp-sdk reference
implementation (Bandwidth/csharp-sdk#201) which kept Refer plain: no
validation, no custom builder, just a shared SipUri property.
@ckoegel
ckoegel merged commit 5eaf0b8 into main Aug 17, 2026
22 of 28 checks passed
@ckoegel
ckoegel deleted the VAPI-3437 branch August 17, 2026 19:38
ckoegel added a commit to Bandwidth/java-sdk that referenced this pull request Aug 17, 2026
* VAPI-3164

* VAPI-3164 Changes done by open-api

* VAPI-3164 Changes done by open-api

* VAPI-3164

* VAPI-3164

* VAPI-3164

* VAPI-3164

* Remove ReferCompleteCallback and use shared SipUri in Refer

ReferCompleteCallback (and its ReferCallStatusEnum dependency) will land
later via a separate api-specs-driven PR once VAPI-3440 merges, so it
doesn't belong in this PR yet.

Refer's nested Refer.ReferSipUri is also removed in favor of the existing
Transfer-flavored SipUri class, matching the merged csharp-sdk reference
implementation (Bandwidth/csharp-sdk#201) which kept Refer plain: no
validation, no custom builder, just a shared SipUri property.

* Remove orphaned referCompleteCallback schema and stale manifest entries

bandwidth.yml/api/openapi.yaml still carried the full referCompleteCallback
schema and a referComplete addition to the shared eventType enum
description after ReferCompleteCallback.java was deleted; nothing
generates from it anymore. Also removed the corresponding
.openapi-generator/FILES entries and a stray README.md indentation glitch.

* Revert remaining referComplete additions in docs/*.md and model javadocs

The eventType enum description was regenerated with referComplete added
to every callback model's docs/*.md and javadoc comment, plus the
standalone eventType schema's line wrap in api/openapi.yaml. Since
ReferCompleteCallback is out of scope for this PR, these are unrelated
diff noise - reverted to match main exactly.

* Revert api/openapi.yaml entirely; drop hand-maintained docs/Refer.md

api/openapi.yaml still carried an unrelated pre-existing rewrap of
transferCompleteCallback's description with no connection to this PR -
reverted the whole file to match main. Also dropped docs/Refer.md: Refer
is hand-written (not generated from api/openapi.yaml), so it's the only
BXML verb with a hand-maintained doc page, matching the csharp-sdk
reviewer's call to delete the equivalent doc there (customers use the
BXML dev docs guide instead).

* Address review feedback: remove unnecessary minimal-attributes test

ckoegel flagged the referMinimal field/test as unnecessary; keeping only
referVerbWithAllAttributes.

---------

Co-authored-by: atelegu <131157078+atelegu@users.noreply.github.com>
Co-authored-by: atelegu <atelegu@bandwidthcontractors.com>
Co-authored-by: stampercasey <cstamper@bandwidth.com>
Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants